package com.daxia.ogmall.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * DecorateNoteComment
 */
@Entity
@Table(name = "decoratenotecomment") 
public class DecorateNoteComment extends BaseModel {
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
    private Long id;
	/**
	 * 详情内容
	 */
	@Column(name = "details")
    private String details;
	/**
	 * 软装笔记
	 */
	@ManyToOne
	@JoinColumn(name = "decorateNote_id")
    private DecorateNote decorateNote;
	/**
	 * 评论的用户
	 */
	@ManyToOne
	@JoinColumn(name = "user_id")
    private User user;
	
	/**
	 * 评分
	 */
	@Column(name = "rate")
	private Double rate;
	
	/**
	 * 图片
	 */
	@Column(name = "images")
	private String images;
	
	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "createTime")
    private Date createTime;
	
	public Long getId() {
    	return id;
    }
	
    public void setId(Long id) {
    	this.id = id;
    }
	
	public String getDetails() {
    	return details;
    }
	
    public void setDetails(String details) {
    	this.details = details;
    }
	
	
	
	public DecorateNote getDecorateNote() {
		return decorateNote;
	}

	public void setDecorateNote(DecorateNote decorateNote) {
		this.decorateNote = decorateNote;
	}

	public User getUser() {
    	return user;
    }
	
    public void setUser(User user) {
    	this.user = user;
    }
	
	public Date getCreateTime() {
    	return createTime;
    }
	
    public void setCreateTime(Date createTime) {
    	this.createTime = createTime;
    }

	public Double getRate() {
		return rate;
	}

	public void setRate(Double rate) {
		this.rate = rate;
	}

	public String getImages() {
		return images;
	}

	public void setImages(String images) {
		this.images = images;
	}
    
    
	
}
